<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  <title>拍卖商品管理页</title>
  <link href="/static/css/common.css" rel="stylesheet" type="text/css" />
  <link href="/static/css/style.css" rel="stylesheet" type="text/css" />
</head>

<body>
<div class="wrap">
  <!-- main begin-->
  <div class="sale">
    <h1 class="lf">在线拍卖系统</h1>
    <div class="logout right"><a href="/logout" title="注销">注销</a></div>
  </div>
  <div class="forms">
    <form name="auctionForm" method="post" target="_self" >
    <label for="name">名称</label>
    <input name="auctionName" type="text" class="nwinput" th:value="${searchParam.get('auctionName')}" id="name"/>
    <label for="names">描述</label>
    <input name="auctionDesc" type="text" id="names" th:value="${searchParam.get('auctionDesc')}" class="nwinput"/>
    <label for="price">起拍价</label>
    <input name="auctionStartPrice" type="text" id="price" th:value="${searchParam.get('auctionStartPrice')}" class="nwinput" />
    <input name="search"  onclick="searchAuction()" value="查询" class="spbg buttombg f14  sale-buttom"/>
      <a href="/addAuctionPage" target="_self">发布</a>
    </form>
  </div>
  <div class="items" >
    <ul class="rows even strong">
      <li>名称</li>
      <li class="list-wd">描述</li>
      <li>开始时间</li>
      <li>结束时间</li>
      <li>起拍价</li>
      <li class="borderno">操作</li>
    </ul>
    <ul class="rows"th:each="item:${auctions}">
      <li th:text="${item.getAuctionName()}"><a title="">国书</a></li>
      <li class="list-wd" th:text="${item.getAuctionDesc()}">明国藏书</li>
      <li th:text="${item.getAuctionStartTime()}">2010-01-20 12:30:30</li>
      <li th:text="${item.getAuctionEndTime()}">2010-09-08 12:30:30</li>
      <li th:text="${item.getAuctionStartPrice()}">2,000</li>
      <li class="borderno red">
        <a th:href="@{'/editAuctionPage/'+${item.getAuctionId()}}" target="_self">修改</a>
        <a th:href="@{'/AuctionDel/'+${item.getAuctionId()}}" target="_self">删除</a>
      </li>
    </ul>

    <div class="page">
      <a href="#" title="">首页</a>
      <a href="#" title="">上一页</a>
      <span class="red">前5页</span>
      <a href="#" title="">1</a>
      <a href="#" title="">2</a>
      <a href="#" title="">3</a>
      <a href="#" title="">4</a>
      <a href="#" title="">5</a>
      <a href="#" title="">下一页</a>
      <a href="#" title="">尾页</a>
    </div>
  </div>
  <script>
    function dele(){
      if(confirm("你真的确认要删除吗？请确认")){
        document.delForm.action="/AuctionDel"
        document.delForm.submit()
        return true;
      }
      else{
        return false;
      }
    }
    function searchAuction(){
      document.auctionForm.action="/searchAuction"
      document.auctionForm.submit()
    }
  </script>
  <!-- main end-->
</div>
</body>
</html>
